cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

find_package(HDF4 REQUIRED)
include_directories(${HDF4_INCLUDE_DIRS})
set(LIBS ${HDF4_LIBRARIES})

find_package(LibGenutils REQUIRED)
include_directories(${LibGenutils_INCLUDE_DIRS})
list(APPEND LIBS ${LibGenutils_LIBRARIES})

ADD_LIBRARY(anc
  getanc.c
  HDFroutines.c
  dataintp.f
  julian.f
)

target_link_libraries(anc ${LIBS})

install (TARGETS anc DESTINATION lib)
